/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package project1;
import java.sql.*;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
 *
 * @author ngochip
 */
public class Project1 {

    /**
     * @throws java.sql.SQLException
     */
    /*
    Cấu trúc biến User
    0: null, 1: ID_User, 2: ten, 3: ngaysinh, 4:gioitinh, 5:quequan, 6:dienthoai, 7:email, 8:password, 9:loai
     - Sinhvien:
        + User:
            10: MSSV, 11: nganhhoc, 12: khoahoc
        + GiangVien
            10: MSGV, 11:bomon
        + CanBo
            10: MSCB
            
    
    */
    public static String version = "1.0";
    public static String UrlServer = "http://google.com.vn";
    public static String NameProgram="Project1.jar";
    public static String UrlDownload=UrlServer+"/?download=1";
    public static Connection conn;
    public static String[] User = new String[20];
    public static void main(String[] args) throws SQLException {
        Func func = new Func();
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Windows".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(LoginView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(LoginView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(LoginView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(LoginView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        try {  
            conn = DriverManager.getConnection("jdbc:sqlite:"+System.getProperty("user.dir")+"/database.db");
        } catch (SQLException ex) {
            Logger.getLogger(SqlFunc.class.getName()).log(Level.SEVERE, null, ex);
        }
        LoginView lg = new LoginView();
        lg.setLocationRelativeTo(null);
        lg.setVisible(true);
        lg.setAlwaysOnTop(true);
    }
    
}
